package com.hnust.root.web.shiro;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.shiro.authc.AuthenticationToken;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class JWTToken implements AuthenticationToken {
    // 密钥
    private String token;

    //用户的openId
    private String openId;

    @Override
    public Object getPrincipal() {
        return token;
    }

    @Override
    public Object getCredentials() {
        return token;
    }

    public JWTToken(String token) {
        this.token = token;
    }
}
